using System;

namespace Sessionizer.Core
{
    /// <summary>
    /// Object storage for session data.
    /// </summary>
    public interface ISessionStorage : IDisposable
    {
        /// <summary>
        /// Gets an instance for given key.
        /// </summary>
        /// <param name="key">Key. Can not be null.</param>
        /// <returns>Instance for given key or null.</returns>
        object Get(Object key);

        /// <summary>
        /// Sets an instance for given key.
        /// </summary>
        /// <param name="key">Key. Can not be null.</param>
        /// <param name="instance">Instance. Can not be null.</param>
        void Set(Object key, object instance);
    }
}